

package com.mars.module.admin.entity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import cn.afterturn.easypoi.excel.annotation.Excel;

/**
 * 订单对象 sys_order
 *
 * @author mars
 * @date 2024-01-24
 */

@Data
@ApiModel(value = "订单对象")
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("sys_order")
public class SysOrder{

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "id")
    private Long id;
    /**
     * 订单编号
     */
    @Excel(name = "订单编号")
    @ApiModelProperty(value = "订单编号")
    private String serialno;
    /**
     * 订单总价
     */
    @Excel(name = "订单总价")
    @ApiModelProperty(value = "订单总价")
    private BigDecimal totalPrice;
    /**
     * 下单用户
     */
    @Excel(name = "下单用户")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @ApiModelProperty(value = "下单用户")
    private Long createUserId;

    @TableField(exist = false)
    @Excel(name = "用户姓名")
    @ApiModelProperty(value = "用户姓名")
    private String userName;
    /**
     * 订单状态
     */
    @Excel(name = "订单状态")
    @ApiModelProperty(value = "订单状态")
    private String status;

    @TableField(exist = false)
    @ApiModelProperty(value = "状态")
    private String statusName;

    @TableField(exist = false)
    @ApiModelProperty(value = "用户类型")
    private String userType;
    /**
     * 收货地址
     */
    @Excel(name = "收货地址")
    @ApiModelProperty(value = "收货地址")
    private String address;
    /**
     * 收货人电话
     */
    @Excel(name = "收货人电话")
    @ApiModelProperty(value = "收货人电话")
    private String telephone;

    @Excel(name = "商品总数")
    @ApiModelProperty(value = "商品总数")
    private String productSum;

    @ApiModelProperty(value = "地址")
    private Long addressId;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品列表")
    private List<SysOrderDetails> productList;
}
